﻿package com.ce.pms.occupation.dao.impl;

import org.hibernate.Query;

import com.ce.pms.base.dao.impl.PmsBaseDaoImpl;
import com.ce.pms.occupation.dao.IOccupationChargeDao;
import com.ce.pms.occupation.model.OccupationChargeDO;

/**
 * 入伙收费的DAO实现
 * @author 王浩羽
 *
 */
public class OccupationChargeDaoImpl extends PmsBaseDaoImpl<OccupationChargeDO> implements IOccupationChargeDao {

	/**
	 * 功能描述:根据身份验证ID查询一个入伙预缴费DO实体  <br>
	 * @param identityValidateId 身份验证ID
	 * @return
	 *
	 * Create author:付湘辉 <br>
	 * Create on:2009-1-15  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public OccupationChargeDO getOccupationChargeDOByIdentityId(Long identityValidateId){
		String hql = "from OccupationChargeDO occ where occ.identityValidate.id=? ";
		Query query = super.createQuery(hql, identityValidateId);
		Object obj = query.uniqueResult();
		return obj==null?null:(OccupationChargeDO)obj;
	}
}
